import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';

export type AccountParams = BasicPageParams & {
  account?: string;
  nickname?: string;
};

export type RoleParams = {
  roleName?: string;
  status?: string;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type DeptParams = {
  deptName?: string;
  status?: string;
};

export type MenuParams = {
  menuName?: string;
  status?: number;
};

export interface AccountListItem {
  id: string;
  account: string;
  email: string;
  nickname: string;
  role: number;
  createTime: string;
  remark: string;
  status: number;
}

export interface DeptListItem {
  id: string;
  orderNo: string;
  createTime: string;
  remark: string;
  status: number;
}

export interface MenuListItem {
  id: string;
  orderNo: string;
  createTime: string;
  status: number;
  icon: string;
  component: string;
  permission: string;
}

export interface RoleListItem {
  id: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}

// 添加自定义图文档数据
export interface ICustomDocument {
  oId: string;
  name: string;
  dataType: string;
  template: string;
  counterID: string;
  createSoft: string;
  datavault: string;
}

// 添加单个图文档类属性
export interface ICustomDocumentSingle {
  prop: string;
  name: string;
  dataType: string;
  length: string;
  attr: string;
  pdmnull: string;
  defaultValue: string;
  dispIndex: string;
  isOnly: string;
  canChange: string;
  docTypeId: string;
}

// 修改已绑定图档类型列表
export interface ICustomDocumentModify {
  key: string;
  title: string;
  description: string;
  disabled: boolean;
}

// 修改自定义图文档基本属性
export interface ICustomDocumentBasic {
  oId: string;
  name: string;
  dataType: string;
  template: string;
  counterID: string;
  createSoft: string;
  datavault: string;
}

// 添加单个零件类属性
export interface ICustomPartSingle {
  prop: string;
  name: string;
  dataType: string;
  length: string;
  attr: string;
  pdmnull: string;
  defaultValue: string;
  dispIndex: string;
  isOnly: string;
  canChange: string;
  docTypeId: string;
}

// 新建零件分类
export interface ICustomPartClass {
  partId: string;
  counterID: string;
  firstFeature: string;
  secondFeature: string;
  disIndex: string;
  isDefault: string;
}

// 添加零件与图文档关联关系
export interface ICustomPartDocument {
  partId: string;
  relationship: string;
  aboutNumber: string;
  docId: string;
  description: string;
}

// 添加对应编码类型
export interface ICustomPartDocumentType {
  counterID: string;
  remark: string;
  mdList: any;
}

/**
 * @description: Request list return value
 */
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>;

export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

export type RoleListGetResultModel = RoleListItem[];
